/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GestionTratamientoMedicamentosoPresentacion.java
 *
 * Created on 07/10/2010, 19:46:08
 */


package presentacion.tratamiento_medicamentoso;

import hibernate.objeto.Farmacologico;
import hibernate.objeto.NoFarmacologico;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Vector;
import javax.swing.RowFilter;
import javax.swing.table.TableRowSorter;
import logica.FarmacologicoLogica;
import logica.NoFarmacologicoLogica;
import presentacion.CapaPresentacion;
import presentacion.GestionPacientePresentacion;
import presentacion.utilidad.PopUpMenu;
import presentacion.comun.ComunFarmacologicoPresentacion;
import presentacion.comun.ComunNoFarmacologicoPresentacion;
import presentacion.utilidad.maquetado.Fuente;
import presentacion.utilidad.BarMenu;
import presentacion.utilidad.tabla.MiModeloTabla;

/**
 *
 * @author Gonzalo
 */
public class HistorialTratamientoMedicamentosoPresentacion extends javax.swing.JDialog {

    /** Creates new form GestionTratamientoMedicamentosoPresentacion */
    public HistorialTratamientoMedicamentosoPresentacion(
            java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        
        initComponents();
        personalizarGUI();
        setSize(CapaPresentacion.getTamañoMaximoJDialog());
        setLocationRelativeTo(null);
        setearEventosQueCapturanTeclaEnterYEscape();
    }

    /**
     * Setea datos de la ventana.
     *
     */
    private void personalizarGUI() {
        //Crea la barra de menu
        this.setJMenuBar(BarMenu.createMenuBarHistorialTratamientoFarmacologico(
                tablaTratamientoMedicamentoso, this));
        
        farmacologico.setSelected(true);
        activo.setSelected(true);
        
        vectorFarmacologico = FarmacologicoLogica.
                getVectorFarmacologicoPorIdPaciente(
                GestionPacientePresentacion.getPaciente().getIdPaciente());
        vectorNoFarmacologico = NoFarmacologicoLogica.
                getVectorNoFarmacologicoPorIdPaciente(
                GestionPacientePresentacion.getPaciente().getIdPaciente());

        personalizarTabla();

        if (CapaPresentacion.modoCarga) {
            ;
        } else if (CapaPresentacion.modoModificacion) {
            ;
        } else if (CapaPresentacion.modoVisualizacion) {
            ;
        }
    }

    /**
     * Dadas la configuracion seleccionada actualiza las tablas.
     *
     */
    static public void personalizarTabla() {
        //Farmacologico & Activo
        if (farmacologico.isSelected() && !noFarmacologico.isSelected() &&
                activo.isSelected() && !noActivo.isSelected()) {
            MiModeloTabla.cargarTablaFarmacologico(
                    FarmacologicoLogica.filtrarVectorFarmacologicoPorEstado(
                    vectorFarmacologico, "Activo"), tablaTratamientoMedicamentoso);
        }

        //Farmacologico & No Activo
        else if (farmacologico.isSelected() && !noFarmacologico.isSelected() &&
                !activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaFarmacologico(
                    FarmacologicoLogica.filtrarVectorFarmacologicoPorEstado(
                    vectorFarmacologico, "No activo"), tablaTratamientoMedicamentoso);
        }

        //Farmacologico & Activo + No Activo
        else if (farmacologico.isSelected() && !noFarmacologico.isSelected() &&
                activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaFarmacologico(
                    vectorFarmacologico, tablaTratamientoMedicamentoso);
        }

        //No Farmacologico & Activo
        else if (!farmacologico.isSelected() && noFarmacologico.isSelected() &&
                activo.isSelected() && !noActivo.isSelected()) {
            MiModeloTabla.cargarTablaNoFarmacologico(
                    NoFarmacologicoLogica.filtrarVectorNoFarmacologicoPorEstado(
                    vectorNoFarmacologico, "Activo"), tablaTratamientoMedicamentoso);
        }

        //No Farmacologico & No Activo
        else if (!farmacologico.isSelected() && noFarmacologico.isSelected() &&
                !activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaNoFarmacologico(
                    NoFarmacologicoLogica.filtrarVectorNoFarmacologicoPorEstado(
                    vectorNoFarmacologico, "No activo"), tablaTratamientoMedicamentoso);
        }

        //No Farmacologico & Activo + No Activo
        else if (!farmacologico.isSelected() && noFarmacologico.isSelected() &&
                activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaNoFarmacologico(
                    vectorNoFarmacologico, tablaTratamientoMedicamentoso);
        }

        //Farmacologico + No Farmacologico & Activo
        else if (farmacologico.isSelected() && noFarmacologico.isSelected() &&
                activo.isSelected() && !noActivo.isSelected()) {
            MiModeloTabla.cargarTablaTratamientoMedicamentoso(
                    FarmacologicoLogica.filtrarVectorFarmacologicoPorEstado(
                    vectorFarmacologico, "Activo"),
                    NoFarmacologicoLogica.filtrarVectorNoFarmacologicoPorEstado(
                    vectorNoFarmacologico, "Activo"),
                    tablaTratamientoMedicamentoso);
        }

        //Farmacologico + No Farmacologico & No Activo
        else if (farmacologico.isSelected() && noFarmacologico.isSelected() &&
                !activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaTratamientoMedicamentoso(
                    FarmacologicoLogica.filtrarVectorFarmacologicoPorEstado(
                    vectorFarmacologico, "No activo"),
                    NoFarmacologicoLogica.filtrarVectorNoFarmacologicoPorEstado(
                    vectorNoFarmacologico, "No activo"),
                    tablaTratamientoMedicamentoso);
        }

        //Farmacologico + No Farmacologico & Activo + No Activo
                else if (farmacologico.isSelected() && noFarmacologico.isSelected() &&
                activo.isSelected() && noActivo.isSelected()) {
            MiModeloTabla.cargarTablaTratamientoMedicamentoso(
                    vectorFarmacologico, vectorNoFarmacologico,
                    tablaTratamientoMedicamentoso);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        farmacologico = new javax.swing.JCheckBox();
        noFarmacologico = new javax.swing.JCheckBox();
        separador = new javax.swing.JSeparator();
        activo = new javax.swing.JCheckBox();
        noActivo = new javax.swing.JCheckBox();
        textoFiltrar = new javax.swing.JLabel();
        filtrar = new javax.swing.JTextField();
        tablaTratamientoMedicamentosoScrollPane = new javax.swing.JScrollPane();
        tablaTratamientoMedicamentoso = new javax.swing.JTable(new MiModeloTabla());
        textoDescriptivoVentana = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Historial Tratamientos Medicamentosos");
        setMinimumSize(new java.awt.Dimension(400, 300));
        setResizable(false);

        farmacologico.setFont(Fuente.FUENTE_CHECKBOX);
        farmacologico.setText("Farmacológico");
        farmacologico.setToolTipText("Seleccione para ver los tratamientos farmacológicos");
        farmacologico.setPreferredSize(new java.awt.Dimension(120, 23));
        farmacologico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                farmacologicoActionPerformed(evt);
            }
        });

        noFarmacologico.setFont(Fuente.FUENTE_CHECKBOX);
        noFarmacologico.setText("No Farmacológico");
        noFarmacologico.setToolTipText("Seleccione para ver los tratamientos nofarmacológicos");
        noFarmacologico.setPreferredSize(new java.awt.Dimension(120, 23));
        noFarmacologico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                noFarmacologicoActionPerformed(evt);
            }
        });

        separador.setOrientation(javax.swing.SwingConstants.VERTICAL);

        activo.setFont(Fuente.FUENTE_CHECKBOX);
        activo.setText("Activo");
        activo.setToolTipText("Seleccione para ver los tratamientos activos");
        activo.setPreferredSize(new java.awt.Dimension(85, 23));
        activo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                activoActionPerformed(evt);
            }
        });

        noActivo.setFont(Fuente.FUENTE_CHECKBOX);
        noActivo.setText("No activo");
        noActivo.setToolTipText("Seleccione para ver los tratamientos no activos");
        noActivo.setPreferredSize(new java.awt.Dimension(85, 23));
        noActivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                noActivoActionPerformed(evt);
            }
        });

        textoFiltrar.setFont(Fuente.FUENTE_LABEL);
        textoFiltrar.setText("Filtrar");
        textoFiltrar.setPreferredSize(new java.awt.Dimension(30, 20));

        filtrar.setFont(Fuente.FUENTE_TEXTFIELD);
        filtrar.setToolTipText("Filtra los datos encontrados por algún criterio");
        filtrar.setMinimumSize(new java.awt.Dimension(0, 0));
        filtrar.setPreferredSize(new java.awt.Dimension(200, 20));
        filtrar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                filtrarKeyReleased(evt);
            }
        });

        tablaTratamientoMedicamentosoScrollPane.setMinimumSize(new java.awt.Dimension(762, 416));
        tablaTratamientoMedicamentosoScrollPane.setPreferredSize(new java.awt.Dimension(762, 416));

        tablaTratamientoMedicamentoso.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaTratamientoMedicamentosoMouseClicked(evt);
            }
        });
        tablaTratamientoMedicamentoso.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                tablaTratamientoMedicamentosoKeyPressed(evt);
            }
        });
        tablaTratamientoMedicamentosoScrollPane.setViewportView(tablaTratamientoMedicamentoso);
        MiModeloTabla.inicializarTabla(tablaTratamientoMedicamentoso);

        textoDescriptivoVentana.setFont(Fuente.FUENTE_TITULO_2);
        textoDescriptivoVentana.setForeground(Fuente.COLOR_NORMAL);
        textoDescriptivoVentana.setText("Historial de tratamientos farmacológicos y no farmacológicos del paciente");
        textoDescriptivoVentana.setPreferredSize(new java.awt.Dimension(1004, 20));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(tablaTratamientoMedicamentosoScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1004, Short.MAX_VALUE)
                    .addComponent(textoDescriptivoVentana, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1004, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(farmacologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(noFarmacologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(separador, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(activo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(noActivo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 342, Short.MAX_VALUE)
                        .addComponent(textoFiltrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(filtrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(textoDescriptivoVentana, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(separador)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(activo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(noActivo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(filtrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(textoFiltrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(farmacologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(noFarmacologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tablaTratamientoMedicamentosoScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 638, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void filtrarKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_filtrarKeyReleased
        TableRowSorter<MiModeloTabla> sorter = new TableRowSorter<MiModeloTabla>(
                (MiModeloTabla) tablaTratamientoMedicamentoso.getModel());

        tablaTratamientoMedicamentoso.setRowSorter(sorter);
        String texto = filtrar.getText();
        if (texto.length() == 0) {
            sorter.setRowFilter(null);
        } else {
            sorter.setRowFilter(RowFilter.regexFilter("(?i).*" + texto + ".*"));
        }
}//GEN-LAST:event_filtrarKeyReleased

    private void tablaTratamientoMedicamentosoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaTratamientoMedicamentosoMouseClicked
        //Farmacologico
        if (esObjetoFarmacologico()) {
            if (evt.getClickCount() == 2 && evt.getButton() == 1) {
                Farmacologico farmacologicoTabla = (Farmacologico)
                        MiModeloTabla.recuperarObjetoDeTabla(
                        Farmacologico.class.getName(),
                        tablaTratamientoMedicamentoso);
                ComunFarmacologicoPresentacion comunFarmacologico =
                        new ComunFarmacologicoPresentacion(this, farmacologicoTabla,
                        tablaTratamientoMedicamentoso, null, filtrar, null,
                        vectorFarmacologico, null);

                comunFarmacologico.verDetalleFarmacologico();
            } else {
                //Despliega pop-up
                PopUpMenu.crearPopupMenuFarmacologico(tablaTratamientoMedicamentoso,
                        this, tablaTratamientoMedicamentoso, null, filtrar, null,
                        vectorFarmacologico, null);
            }

        //NoFarmacologico
        } else {
            if (evt.getClickCount() == 2 && evt.getButton() == 1) {
                NoFarmacologico noFarmacologicoTabla = (NoFarmacologico)
                        MiModeloTabla.recuperarObjetoDeTabla(
                        NoFarmacologico.class.getName(),
                        tablaTratamientoMedicamentoso);

                ComunNoFarmacologicoPresentacion comunNoFarmacologico =
                        new ComunNoFarmacologicoPresentacion(this,
                        noFarmacologicoTabla, tablaTratamientoMedicamentoso,
                        filtrar, vectorNoFarmacologico);
                comunNoFarmacologico.verDetalleNoFarmacologico();
            } else {
                //Despliega pop-up
                PopUpMenu.crearPopupMenuNoFarmacologico(tablaTratamientoMedicamentoso,
                        this, filtrar, vectorNoFarmacologico);
            }
        }
    }//GEN-LAST:event_tablaTratamientoMedicamentosoMouseClicked

    private void tablaTratamientoMedicamentosoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tablaTratamientoMedicamentosoKeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            verPropiedades();
        }
    }//GEN-LAST:event_tablaTratamientoMedicamentosoKeyPressed

    private void noFarmacologicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_noFarmacologicoActionPerformed
        if (!noFarmacologico.isSelected() && !farmacologico.isSelected()) {
            noFarmacologico.setSelected(true);
        }
        personalizarTabla();
}//GEN-LAST:event_noFarmacologicoActionPerformed

    private void farmacologicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_farmacologicoActionPerformed
        if (!farmacologico.isSelected() && !noFarmacologico.isSelected()) {
            farmacologico.setSelected(true);
        }
        personalizarTabla();
}//GEN-LAST:event_farmacologicoActionPerformed

    private void activoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activoActionPerformed
        if (!activo.isSelected() && !noActivo.isSelected()) {
            activo.setSelected(true);
        }
        personalizarTabla();
    }//GEN-LAST:event_activoActionPerformed

    private void noActivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_noActivoActionPerformed
        if (!noActivo.isSelected() && !activo.isSelected()) {
            noActivo.setSelected(true);
        }
        personalizarTabla();
    }//GEN-LAST:event_noActivoActionPerformed

    /**
     * Chequea si el objeto seleccionado corresponde a un objeto Farmacologico.
     *
     * @return true si es Farmacologico, false si es NoFarmacologico
     */
    private boolean esObjetoFarmacologico() {
        int[] seleccion = tablaTratamientoMedicamentoso.getSelectedRows();
        int i = -1;

        if (farmacologico.isSelected()) {
            return true;
        }
        
        if (noFarmacologico.isSelected()) {
            return false;
        }

        if (!farmacologico.isSelected() && !noFarmacologico.isSelected() &&
                seleccion.length != 0) {
            i = seleccion[0];
            String tipo = tablaTratamientoMedicamentoso.getValueAt(i, 2).toString();
            if (tipo.equalsIgnoreCase("Farmacológico")) {
                return true;
            } else {
                return false;
            }
        }

        return false;
    }

    /**
     * Ver las propiedades.
     */
    public void verPropiedades() {
        if (esObjetoFarmacologico()) {
            Farmacologico farmacologicoTabla = (Farmacologico)
                    MiModeloTabla.recuperarObjetoDeTabla(
                    Farmacologico.class.getName(), tablaTratamientoMedicamentoso);

            ComunFarmacologicoPresentacion comunFarmacologico =
                    new ComunFarmacologicoPresentacion(this, farmacologicoTabla,
                    tablaTratamientoMedicamentoso, null, filtrar, null,
                    vectorFarmacologico, null);
            comunFarmacologico.verDetalleFarmacologico();
        } else {
            NoFarmacologico noFarmacologicoTabla = (NoFarmacologico)
                    MiModeloTabla.recuperarObjetoDeTabla(
                    NoFarmacologico.class.getName(), tablaTratamientoMedicamentoso);

            ComunNoFarmacologicoPresentacion comunNoFarmacologico =
                    new ComunNoFarmacologicoPresentacion(this, noFarmacologicoTabla,
                    tablaTratamientoMedicamentoso, filtrar, vectorNoFarmacologico);
            comunNoFarmacologico.verDetalleNoFarmacologico();
        }
        
        personalizarTabla();
    }

    /**
     * Setea en cada componente del JDialog los eventos que capturarán la tecla
     * enter y escape.
     */
    private void setearEventosQueCapturanTeclaEnterYEscape() {
        //Declaración del evento a capturar
        KeyListener keyListenerEscape = new KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
                    //Llamada al método que capturará el boton enter y
                    //trabajará sobre el mismo
                    dispose();
                }
            }
        };
        //Setear eventos
        farmacologico.addKeyListener(keyListenerEscape);
        noFarmacologico.addKeyListener(keyListenerEscape);
        activo.addKeyListener(keyListenerEscape);
        noActivo.addKeyListener(keyListenerEscape);

        tablaTratamientoMedicamentoso.addKeyListener(keyListenerEscape);

        filtrar.addKeyListener(keyListenerEscape);
    }

    public static Vector<Farmacologico> getVectorFarmacologico() {
        return vectorFarmacologico;
    }

    public static Vector<NoFarmacologico> getVectorNoFarmacologico() {
        return vectorNoFarmacologico;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private static javax.swing.JCheckBox activo;
    private static javax.swing.JCheckBox farmacologico;
    private javax.swing.JTextField filtrar;
    private static javax.swing.JCheckBox noActivo;
    private static javax.swing.JCheckBox noFarmacologico;
    private javax.swing.JSeparator separador;
    private static javax.swing.JTable tablaTratamientoMedicamentoso;
    private javax.swing.JScrollPane tablaTratamientoMedicamentosoScrollPane;
    private javax.swing.JLabel textoDescriptivoVentana;
    private javax.swing.JLabel textoFiltrar;
    // End of variables declaration//GEN-END:variables
    private static Vector<Farmacologico> vectorFarmacologico;
    private static Vector<NoFarmacologico> vectorNoFarmacologico;
}
